package org.brakepedal.server.support.http;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 * Date: 2023/2/10 15:16

 
 */
@JsonDeserialize
public enum ResponseBodyCode implements EnumConverter<String,Integer>{

    SUCCESS(200),

    BAD_REQUEST( 400),

    SERVER_ERROR(  500),

    BAD_CREDENTIAL(403),

    MORE_HANDLE_STRATAGEM(  300);

    private final int value;

    ResponseBodyCode(int value) {
        this.value = value;
    }

    @JsonValue
    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getKey() {
        return name();
    }

}
